package leetcode.sword;

import java.util.Arrays;

public class Solution39 {

    public int majorityElement(int[] nums) {
        //排序拿到中间位置的数
        Arrays.sort(nums);
        return nums[nums.length>>1];
    }
}
